var yongqi = jQuery.extend({
	errorAlert : function(){
		swal("系统错误，请联系管理员！","","error");
	},
	/*
	 * 删除sweetalert+ajax删除数据
	 * 参数：url,条件,Ajax成功执行方法
	 */
	swatDelConfirm : function(url,params,succfn){
		swal({
			title : "确定删除吗",
			text : "你将无法恢复",
			type : "warning",
			showCancelButton : true,
			confirmButtonColor : "#DD6B55",
			confirmButtonText : "确定删除！",
			cancelButtonText : "取消删除！",
			closeOnConfirm : false,
			closeOnCancel : false
		},
		function (isConfirm){
			if(isConfirm){
				yongqi.delAjax(url,params,succfn);
				swal("删除！","","success");
			}else{
				swal("取消！","","error");
			};
		});
	},
	delAjax : function(url,params,succfn){
		$.ajax({
			url : url,
			data : params,
			dataType : "json",
			method : "post",
			success : succfn,
			error : function(){
				swal("系统错误，请联系管理员！","","error");
			}
		});
	},
	/**
	 * 详细信息Ajax
	 */
	detAjax : function(url,params,succfn){
		$.ajax({
			url : url,
			data : params,
			dataType : "json",
			method : "post",
			success : succfn,
			error : function(){
				swal("系统错误，请联系管理员！","","error");
			}
		})
	},
	/**
	 * 获取数据Ajax
	 */
	queryAjax : function(url,params,succfn){
		$.ajax({
			url : url,
			data : params,
			dataType : "json",
			method : "post",
			success : succfn,
			error : function(){
				swal("系统错误，请联系管理员！","","error");
			}
		})
	},
	/**
	 * Ajax
	 */
	allAjax : function(url,params,succfn){
		$.ajax({
			url : url,
			data : params,
			dataType : "json",
			method : "post",
			success : succfn,
			error : function(){
				swal("系统错误，请联系管理员！","","error");
			}
		})
	},
	
});